/**用户模块reducer */
type RDMemberReducer = {
    /**计数器 */
    count: number
}

/**用户模块actions */
export enum RDMemberActions {
    add = "MEMBERACTIONS_ADD"
}

export enum RDOrderActions {
    add = "Order_ADD"
}


/**初始化reducer */
const initState = (): RDMemberReducer => {
    return {
        count: 0
    }
}


const memberReducer = (state = initState(), action: { type: RDMemberActions, data: any }) => {
    switch (action.type) {
        case RDMemberActions.add:
            return { ...state, count: action.data }
        default:
            return state;
    }
}

export default memberReducer;